import { Avatar, Button, Dropdown } from 'antd';
import { useState, useEffect } from 'react'
import { routes } from '../../../../../utils/routes';
import { UserOutlined } from '@ant-design/icons';
import { useParams, useHistory } from 'react-router-dom';
export default function Right(props) {
    const history = useHistory();
    return <>
        <Button type="text" style={{
            height: 68,
            borderRadius: 0
        }}
        onClick={()=>{
            history.push(`/manager/sfxxgl`)
        }}>
            个人信息
        </Button>
        <Dropdown trigger={['click']} menu={{
            onClick: ({ key }) => {
                switch (key) {
                    case 'manager':
                        window.open(process.env.PUBLIC_URL + routes.manager.path, '_blank');
                        break;
                    default:
                }
            },
            items: [{
                key: 'manager',
                label: '后台管理',
            }]
        }}>
            <Button type="text" style={{
                height: 68,
                borderRadius: 0
            }}>
                <Avatar icon={<UserOutlined />} />
            </Button>
        </Dropdown>
    </>;
}